package homework_03;

public class home_01 {
    public static void main(String[] args) {
        double a=9,comm;
        if (a<=10){
            comm=a*0.1;
        }else if (a>10&&a<20){
            comm=10*0.1+(a-10)*0.075;
        }else if(a>20&&a<40){
            comm=(a-20)*0.05+10*0.1+10*0.075;
        }else if(a>40&&a<60){
            comm=(a-40)*0.03+20*0.05+10*0.1+10*0.075;
        }else if (a>60&&a<100){
            comm=(a-60)*0.015+20*0.05+10*0.1+10*0.075+20*0.03;
        }else{
            comm=(a-100)*0.01+20*0.05+10*0.1+10*0.075+20*0.03+40*0.015;
        }
        System.out.println(comm);
    }
}